﻿using System.Web.Mvc;
using System.Collections;
using FantasyDraft.Models;
using System.Linq;
using System.Collections.Generic; 

namespace FantasyDraft.Controllers
{
    public class HomeController : Controller
    {
        FantasyDraftEntities fantasyDB = new FantasyDraftEntities();

        public ActionResult Index()
        {
            //ViewBag.Message = "Welcome to ASP.NET MVC!";

           /* var playerName = (from players in fantasyDB.Players
                              where players.PlayerId == 2
                              select players.Name).ToList();
            ViewBag.Message = (string)playerName;*/
            var playerdata = fantasyDB.Players.ToList();
            
            return View(playerdata);
        }

        public ActionResult About()
        {
            return View();
        }

    }
}
